home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
-
- # ---------------------------------------------------
- # Script for unmounting diskettes
- # ---------------------------------------------------
-
- # ---- EDIT TO SUIT YOUR NEEDS -------
- # Put it in your path (/usr/local/lib).
-
- # Directory under which the diskette is mounted
- #DIRECTORY=/a
- DIRECTORY=/b
-
- COLOR1="\033[37;44m" # normal white on blue
- COLOR2="\033[1;6m\033[37;44m" # bright white on blue
- COLOR3="\033[1;6m\033[36;44m" # bright cyan on blue
- COLOR4="\033[0m\033[34;47m" # blue on normal white
- COLOR5="\033[1;6m\033[31;40m" # bright red on black
- COLOR6="\033[1;6m\033[37;41m" # bright white on red
- COLOR_RESET="\033[0m"
-
- # ===== YOU CANNOT UMOUNT /b WHILE YOU ARE IN IT ======
-
- if `umount /b 2> /tmp/error.temp`
- then
- echo -e $COLOR2 " OK " $COLOR4 $DIRECTORY is unmounted \
- $COLOR_RESET
- else
- echo -e $COLOR6 " ERROR " $COLOR5 `cat /tmp/error.temp` \
- $COLOR_RESET
- exit
- fi
-
- rm -f /tmp/error.tmp 2> /dev/null
-
-
-
-
-
-
-
-
-
-
-
-